home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / Expander.C < prev    next >
C/C++ Source or Header  |  1992-05-05  |  1KB  |  69 lines

  1. #ifdef __GNUG__
  2. #pragma implementation
  3. #endif
  4.  
  5. #include "Expander.h"
  6.  
  7. #include "Class.h"
  8.  
  9. //---- Expander ----------------------------------------------------------------
  10.  
  11. NewMetaImpl0(Expander, Box);
  12.  
  13. Expander::Expander(int id, Direction d, Point g)
  14.                         : Box(id, gPoint0, g, (VObjAlign)0)
  15. {
  16.     Init(d);
  17. }
  18.  
  19. Expander::Expander(int id, Direction d, Point g, VObject *va_(vop), ...)
  20.                         : Box(id, gPoint0, g, (VObjAlign)0)
  21. {
  22.     va_list ap;
  23.     va_start(ap,va_(vop));
  24.     SetItems(va_(vop), ap);
  25.     Init(d);
  26.     va_end(ap);
  27. }
  28.  
  29. Expander::Expander(int id, Direction d, Point g, SeqCollection *c)
  30.                     : Box(id, gPoint0, g, (VObjAlign)0, c)
  31. {
  32.     Init(d);
  33. }
  34.  
  35. void Expander::Init(Direction d)
  36. {
  37.     
  38.     if (d == eVert) {
  39.     align= (VObjAlign)(eVObjHLeft|eVObjVExpand|eVObjHExpand);
  40.     colsrows.x= 1;
  41.     } else {
  42.     align= (VObjAlign)(eVObjVTop|eVObjVExpand|eVObjHExpand);
  43.     colsrows.y= 1;
  44.     }
  45. }
  46.  
  47. //---- HExpander ---------------------------------------------------------------
  48.  
  49. HExpander::HExpander(Point g, VObject *va_(vop), ...)
  50.                 : Expander(cIdNone, eHor, g, (SeqCollection*)0)
  51. {
  52.     va_list ap;
  53.     va_start(ap,va_(vop));
  54.     SetItems(va_(vop), ap);
  55.     va_end(ap);
  56. }
  57.  
  58. //---- VExpander ---------------------------------------------------------------
  59.  
  60. VExpander::VExpander(Point g, VObject *va_(vop), ...)
  61.                 : Expander(cIdNone, eVert, g, (SeqCollection*)0)
  62. {
  63.     va_list ap;
  64.     va_start(ap,va_(vop));
  65.     SetItems(va_(vop), ap);
  66.     va_end(ap);
  67. }
  68.  
  69.